As an inkjet printer to which a cartridge type main tank storing ink is removably mounted, there is an inkjet printer including a sensor configured to detect a remaining amount of ink in the main tank. As an example of the detection of the remaining ink amount, the remaining ink amount sensor optically detects a position of a float provided in the main tank which descends with the lowering of the ink level. Accordingly, the remaining ink amount can be detected with high accuracy. However, the float reaches the bottom of the main tank even in a state where the ink remains in the main tank. Therefore, a state where the remaining ink amount becomes zero cannot be detected, and the ink cannot be used up.
Meanwhile, as another method for detecting the remaining ink amount in the main tank, there is a method of cumulatively calculating an ink amount ejected from an inkjet head with software. This method enables the state of zero remaining ink amount to be detected. However, since minute errors may be contained in the ejected liquid amount used in the calculation for each ejection, such errors accumulate by the time the ink in the main tank is used up. Therefore, the remaining ink amount cannot be detected with high accuracy.
In JP-A-2005-246781, the former method for optically detecting the remaining ink amount using the float and the latter method for detecting the remaining ink amount with software are combined to enable the ink to be fully used up and detect the remaining ink amount precisely. Specifically, a seesaw-like float blocks light to a light receiving unit of an optical sensor when ink is filled, and with the lowering of the liquid level according to ink consumption, the float swings and allows the light to enter the light receiving unit of the optical sensor. Accordingly, it is firstly detected that the ink has decreased up to a threshold level (remaining amount detection). Then, the number of ink droplets ejected from the inkjet head is cumulatively calculated with software, which starts at the time of the remaining amount detection. Accordingly, it is secondarily calculated and detected that the remaining ink amount becomes zero (remaining amount calculation). That is, since the calculation of the remaining ink amount with software starts after the amount of ink in the main tank becomes low, error does not accumulate so much and the remaining ink amount can be detected accurately.
In a case where the ink in the main tank is used up and then the main tank is exchanged with a new one, air may enter an ink supplying path leading up to the inkjet head. In a tube supplying type inkjet printer disclosed in JP-A-2005-66906, a sub tank open to an atmosphere is disposed between the main tank and an ink supplying tube to prevent the entry of air into the ink supplying path even if the ink in the cartridge type main tank is used up. Accordingly, even if the ink in the main tank is used up, air does not enter the ink supplying tube since the ink remains in the sub tank. Moreover, even if air enters a connection portion between the main tank and the sub tank during exchange of the main tank, the air is separated by buoyancy from the ink in the sub tank and is thereby prevented from entering the ink supplying tube.